package com.ztx.web.controller.manager;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ztx.model.ReportAllVO;
import com.ztx.pagemodel.easyui.DataGrid;
import com.ztx.pagemodel.easyui.PageHelper;
import com.ztx.service.manager.IBusinessService;
import com.ztx.utils.Utils;

/**
 * 
 * 营业信息查询
 *
 */
@Controller
@RequestMapping("report")
public class BusinessController {

	@Resource
	private IBusinessService businessService = null;

	@RequestMapping(value = "list", method = RequestMethod.GET)
	public String list(Model model) {
		String today = Utils.getCurrentDatetime("yyyy-MM-dd");
		model.addAttribute("today", today);
		return "manager/report";
	}

	@RequestMapping(value = "datagrid")
	@ResponseBody
	public DataGrid<ReportAllVO> datagrid(PageHelper ph, ReportAllVO params) {
		return businessService.queryBusiness(ph, params);
	}

}
